/**
 * Created by vincent on 2016/2/16.
 */
moduleCommon.service('LoadingService', function ($rootScope, $timeout) {
    var timer;
    this.show = function (seconds) {
        // if (StringUtils.isNlOrUndOrEmpty(seconds)) {
        //     seconds = 15;
        // }
        $('.ngdialog-overlay')[0].style.zIndex = "10001";
        $rootScope.loading = true;
        // timer = $timeout(function () {
        //     $('.ngdialog-overlay')[0].style.zIndex = "-1";
        //     $rootScope.loading = false;
        // }, seconds * 1000);
       // $timeout.cancel(timer);
    };

    this.hide = function () {
        $('.ngdialog-overlay')[0].style.zIndex = "-1";
        $rootScope.loading = false;
        // pageResize();
        //$timeout.cancel(timer);
    };
});